package com.bolt.admin.logging.util;

import java.util.concurrent.ThreadLocalRandom;

/**
 * Created by Administrator on 2020/2/14.
 */
public class LogUtil {
    /**
     * 生成日志随机数
     *
     * @return
     */
    public static String getTraceId() {
        int i = 0;
        StringBuilder st = new StringBuilder();
        while (i < 5) {
            i++;
            st.append(ThreadLocalRandom.current().nextInt(10));
        }
        return st.toString() + System.currentTimeMillis();
    }
}

 